﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                    mc:Ignorable="d">
	<!-- Resource dictionary entries should be defined here. -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colors.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <Style x:Key="SearchButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="MinWidth" Value="20"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SearchButtonTemplate, TypeInTargetAssembly={x:Type Button}}}"/>
	</Style>
	
    <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SearchButtonTemplate, TypeInTargetAssembly={x:Type Button}}" TargetType="{x:Type Button}">
        <Grid x:Name="MainGrid" Width="20" Height="20">
    		<VisualStateManager.VisualStateGroups>
    			<VisualStateGroup x:Name="CommonStates">
    				<VisualStateGroup.Transitions>
    					<VisualTransition From="Normal" GeneratedDuration="0:0:0.4" To="MouseOver"/>
    					<VisualTransition From="MouseOver" GeneratedDuration="0:0:0.4" To="Normal"/>
    					<VisualTransition From="MouseOver" GeneratedDuration="0:0:0.2" To="Pressed"/>
    					<VisualTransition From="Pressed" GeneratedDuration="0:0:0.2" To="MouseOver"/>
    					<VisualTransition From="Pressed" GeneratedDuration="0:0:0.3" To="Normal"/>
    				</VisualStateGroup.Transitions>
    				<VisualState x:Name="Normal"/>
    				<VisualState x:Name="MouseOver">
    					<Storyboard>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="ellipse">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Move_Blue1}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="ellipse">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Move_Blue2}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="path">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Move_Blue2}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="path">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Move_Blue1}"/>
    						</ColorAnimationUsingKeyFrames>
    					</Storyboard>
    				</VisualState>
    				<VisualState x:Name="Pressed">
    					<Storyboard>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="path">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Pressed_Blue2}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="path">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Pressed_Blue1}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="ellipse">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Pressed_Blue1}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="ellipse">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_TextBox_SearchButton_Background_Pressed_Blue2}"/>
    						</ColorAnimationUsingKeyFrames>
    					</Storyboard>
    				</VisualState>
    				<VisualState x:Name="Disabled">
    					<Storyboard>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="ellipse">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_Control_Background_Disabled}"/>
    						</ColorAnimationUsingKeyFrames>
    						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="path">
    							<EasingColorKeyFrame KeyTime="0" Value="{StaticResource Application_Control_Background_Disabled}"/>
    						</ColorAnimationUsingKeyFrames>
    					</Storyboard>
    				</VisualState>
    			</VisualStateGroup>
    		</VisualStateManager.VisualStateGroups>
    		<Border x:Name="ButtonBorder" BorderThickness="0" CornerRadius="2" Height="Auto" Width="Auto" Margin="0" Opacity="0.1">
    			<Border.Background>
    				<SolidColorBrush Color="{StaticResource Application_TextBox_Background}"/>
    			</Border.Background>
    		</Border>
    		<Path x:Name="path" Data="M0,1L1,0" Fill="{x:Null}" HorizontalAlignment="Left" Height="5" Margin="3.5,0,0,3.5" Stretch="Fill" VerticalAlignment="Bottom" Width="5" d:LayoutOverrides="HorizontalAlignment">
    			<Path.Stroke>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="{StaticResource Application_TextBox_SearchButton_Background}" Offset="0.002"/>
    					<GradientStop Color="{StaticResource Application_TextBox_SearchButton_Background}" Offset="1"/>
    				</LinearGradientBrush>
    			</Path.Stroke>
    		</Path>
    		<Ellipse x:Name="ellipse" Fill="{x:Null}" Margin="6.5,3.5,3.5,6.5" Height="10" VerticalAlignment="Stretch" Width="10">
    			<Ellipse.Stroke>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="{StaticResource Application_TextBox_SearchButton_Background}" Offset="0"/>
    					<GradientStop Color="{StaticResource Application_TextBox_SearchButton_Background}" Offset="1"/>
    				</LinearGradientBrush>
    			</Ellipse.Stroke>
    		</Ellipse>
    	</Grid>
    </ControlTemplate>
</ResourceDictionary>